object Datos: TDatos
  OldCreateOrder = False
  Left = 247
  Top = 39
  Height = 500
  Width = 688
  object Con: TSQLConnection
    ConnectionName = 'IBLocal'
    DriverName = 'Interbase'
    GetDriverFunc = 'getSQLDriverINTERBASE'
    LibraryName = 'dbexpint.dll'
    LoginPrompt = False
    Params.Strings = (
      'BlobSize=-1'
      'CommitRetain=True'
      'Database=192.168.0.200:bdstp1'
      'DriverName=Interbase'
      'ErrorResourceFile='
      'LocaleCode=0000'
      'Password=4884mifa'
      'RoleName=RoleName'
      'ServerCharSet='
      'SQLDialect=3'
      'Interbase TransIsolation=ReadCommited'
      'User_Name=sysdba'
      'WaitOnLocks=True')
    VendorLib = 'GDS32.DLL'
    Left = 8
    Top = 408
  end
  object qryVar: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 88
    Top = 360
  end
  object cUsuario: TSQLClientDataSet
    CommandText = 'USUARIO'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cUsuarioBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cUsuarioNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 16
    Top = 256
    object cUsuarioID_USUARIO: TSmallintField
      FieldName = 'ID_USUARIO'
    end
    object cUsuarioNOMBRE: TStringField
      FieldName = 'NOMBRE'
    end
    object cUsuarioCLAVE: TStringField
      FieldName = 'CLAVE'
      Size = 10
    end
    object cUsuarioNIVEL: TSmallintField
      FieldName = 'NIVEL'
    end
  end
  object dsProv: TSQLDataSet
    SQLConnection = Con
    CommandText = 'PROVEEDOR'
    CommandType = ctTable
    Params = <>
    Left = 296
    Top = 8
    object dsProvID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dsProvRAZON: TStringField
      FieldName = 'RAZON'
      Required = True
      Size = 40
    end
    object dsProvALTA: TSQLTimeStampField
      FieldName = 'ALTA'
    end
    object dsProvCUIT: TStringField
      FieldName = 'CUIT'
      Size = 13
    end
    object dsProvDOMICILIO: TStringField
      FieldName = 'DOMICILIO'
      Required = True
      Size = 50
    end
    object dsProvEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 40
    end
    object dsProvWEB: TStringField
      FieldName = 'WEB'
      Size = 50
    end
    object dsProvCONTACTO: TStringField
      FieldName = 'CONTACTO'
      Size = 50
    end
    object dsProvCONDICION: TStringField
      FieldName = 'CONDICION'
      Size = 3
    end
    object dsProvOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object dsProvID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
      Required = True
    end
    object dsProvMAESTRO: TStringField
      FieldName = 'MAESTRO'
      Required = True
      Size = 1
    end
    object dsProvMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
      Required = True
    end
    object dsProvTANTERO: TStringField
      FieldName = 'TANTERO'
      Size = 1
    end
    object dsProvTITULAR: TStringField
      FieldName = 'TITULAR'
      Size = 255
    end
  end
  object dsTeProv: TSQLDataSet
    SQLConnection = Con
    CommandText = 'select * from TE_PROVEEDOR where id_proveedor = :id_proveedor'
    DataSource = sProv
    Params = <
      item
        DataType = ftSmallint
        Name = 'ID_PROVEEDOR'
        ParamType = ptInput
        Size = 2
      end>
    Left = 376
    Top = 8
    object dsTeProvNUMERO: TStringField
      FieldName = 'NUMERO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      Size = 12
    end
    object dsTeProvID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object sProv: TDataSource
    DataSet = dsProv
    Left = 336
    Top = 8
  end
  object pProv: TDataSetProvider
    DataSet = dsProv
    Constraints = True
    Left = 296
    Top = 56
  end
  object cProv: TClientDataSet
    Aggregates = <>
    AutoCalcFields = False
    IndexFieldNames = 'RAZON'
    Params = <>
    ProviderName = 'pProv'
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cProvNewRecord
    Left = 336
    Top = 56
    object cProvID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cProvRAZON: TStringField
      FieldName = 'RAZON'
      Required = True
      Size = 40
    end
    object cProvALTA: TSQLTimeStampField
      FieldName = 'ALTA'
      EditMask = '!99/99/00;1;_'
    end
    object cProvCUIT: TStringField
      FieldName = 'CUIT'
      EditMask = '00-00000000-0;1;_'
      Size = 13
    end
    object cProvDOMICILIO: TStringField
      FieldName = 'DOMICILIO'
      Required = True
      Size = 50
    end
    object cProvID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
    end
    object cProvEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 40
    end
    object cProvWEB: TStringField
      FieldName = 'WEB'
      Size = 50
    end
    object cProvCONTACTO: TStringField
      FieldName = 'CONTACTO'
      Size = 50
    end
    object cProvCONDICION: TStringField
      FieldName = 'CONDICION'
      Size = 3
    end
    object cProvOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object cProvMAESTRO: TStringField
      FieldName = 'MAESTRO'
      Required = True
      Size = 1
    end
    object cProvMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
      Required = True
    end
    object cProvdsTeProv: TDataSetField
      FieldName = 'dsTeProv'
    end
    object cProvlocalidad: TStringField
      FieldKind = fkLookup
      FieldName = 'localidad'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'LOCALIDAD'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cProvcaracteristica: TStringField
      DisplayWidth = 6
      FieldKind = fkLookup
      FieldName = 'caracteristica'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CARACTERISTICA'
      KeyFields = 'ID_LOCALIDAD'
      Size = 6
      Lookup = True
    end
    object cProvcodPostal: TStringField
      FieldKind = fkLookup
      FieldName = 'codPostal'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CODIGO_POSTAL'
      KeyFields = 'ID_LOCALIDAD'
      Size = 15
      Lookup = True
    end
    object cProvprovincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'PROVINCIA'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cProvTANTERO: TStringField
      FieldName = 'TANTERO'
      Size = 1
    end
    object cProvTITULAR: TStringField
      FieldName = 'TITULAR'
      Size = 255
    end
  end
  object cTeProv: TClientDataSet
    Aggregates = <>
    DataSetField = cProvdsTeProv
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    Left = 376
    Top = 56
    object cTeProvID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cTeProvNUMERO: TStringField
      FieldName = 'NUMERO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      Size = 12
    end
  end
  object dsPcia: TSQLDataSet
    SQLConnection = Con
    CommandText = 'PROVINCIA'
    CommandType = ctTable
    Params = <>
    Left = 296
    Top = 112
    object dsPciaID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dsPciaPROVINCIA: TStringField
      FieldName = 'PROVINCIA'
      Required = True
      Size = 30
    end
  end
  object sPcia0: TDataSource
    DataSet = dsPcia
    Left = 336
    Top = 112
  end
  object dsLoc: TSQLDataSet
    SQLConnection = Con
    CommandText = 'select * from LOCALIDAD where id_provincia = :id_provincia'
    DataSource = sPcia0
    Params = <
      item
        DataType = ftSmallint
        Name = 'ID_PROVINCIA'
        ParamType = ptInput
        Size = 2
      end>
    Left = 376
    Top = 112
    object dsLocID_LOCALIDAD: TIntegerField
      FieldName = 'ID_LOCALIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dsLocID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dsLocCARACTERISTICA: TStringField
      FieldName = 'CARACTERISTICA'
      Required = True
      Size = 6
    end
    object dsLocCODIGO_POSTAL: TStringField
      FieldName = 'CODIGO_POSTAL'
      Required = True
      Size = 15
    end
    object dsLocLOCALIDAD: TStringField
      FieldName = 'LOCALIDAD'
      Required = True
      Size = 30
    end
  end
  object pPcia: TDataSetProvider
    DataSet = dsPcia
    Constraints = True
    Left = 296
    Top = 160
  end
  object cPcia: TClientDataSet
    Aggregates = <>
    IndexFieldNames = 'provincia'
    Params = <>
    ProviderName = 'pPcia'
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cPciaNewRecord
    Left = 336
    Top = 160
    object cPciaID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPciaPROVINCIA: TStringField
      FieldName = 'PROVINCIA'
      Required = True
      Size = 30
    end
    object cPciadsLoc: TDataSetField
      FieldName = 'dsLoc'
    end
  end
  object cLoc: TClientDataSet
    Aggregates = <>
    DataSetField = cPciadsLoc
    IndexFieldNames = 'localidad'
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cLocNewRecord
    Left = 376
    Top = 160
    object cLocID_LOCALIDAD: TIntegerField
      FieldName = 'ID_LOCALIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cLocID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cLocCARACTERISTICA: TStringField
      FieldName = 'CARACTERISTICA'
      Required = True
      Size = 6
    end
    object cLocCODIGO_POSTAL: TStringField
      FieldName = 'CODIGO_POSTAL'
      Required = True
      Size = 15
    end
    object cLocLOCALIDAD: TStringField
      FieldName = 'LOCALIDAD'
      Required = True
      Size = 30
    end
  end
  object cLoc1: TSQLClientDataSet
    CommandText = 'LOCALIDAD'
    Aggregates = <>
    IndexFieldNames = 'localidad'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    CommandType = ctTable
    DBConnection = Con
    Left = 448
    Top = 16
    object cLoc1ID_LOCALIDAD: TIntegerField
      FieldName = 'ID_LOCALIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cLoc1ID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
    end
    object cLoc1CARACTERISTICA: TStringField
      FieldName = 'CARACTERISTICA'
      Size = 6
    end
    object cLoc1CODIGO_POSTAL: TStringField
      FieldName = 'CODIGO_POSTAL'
      Size = 15
    end
    object cLoc1LOCALIDAD: TStringField
      FieldName = 'LOCALIDAD'
      Size = 30
    end
    object cLoc1provincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cPcia1
      LookupKeyFields = 'ID_PROVINCIA'
      LookupResultField = 'PROVINCIA'
      KeyFields = 'ID_PROVINCIA'
      Size = 30
      Lookup = True
    end
  end
  object cPcia1: TSQLClientDataSet
    CommandText = 'PROVINCIA'
    Aggregates = <>
    IndexFieldNames = 'provincia'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    CommandType = ctTable
    DBConnection = Con
    Left = 480
    Top = 16
    object cPcia1ID_PROVINCIA: TSmallintField
      FieldName = 'ID_PROVINCIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cPcia1PROVINCIA: TStringField
      FieldName = 'PROVINCIA'
      Size = 30
    end
  end
  object cRubro: TSQLClientDataSet
    CommandText = 'select * from RUBRO where id_proveedor = :id_proveedor'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'rubro'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeDelete
    OnNewRecord = cRubroNewRecord
    DBConnection = Con
    Left = 16
    Top = 8
    object cRubroID_RUBRO: TIntegerField
      FieldName = 'ID_RUBRO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cRubroID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cRubroRUBRO: TStringField
      FieldName = 'RUBRO'
      Required = True
      Size = 30
    end
    object cRubroCOD_ORIGEN: TStringField
      FieldName = 'COD_ORIGEN'
      Size = 5
    end
    object cRubroMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
      Required = True
    end
    object cRubrototal: TAggregateField
      FieldName = 'total'
      Visible = True
      Active = True
      Expression = 'count(id_rubro)'
    end
  end
  object cMaterial: TSQLClientDataSet
    CommandText = 'select * from MATERIAL where id_rubro = :id_rubro'
    Aggregates = <>
    AggregatesActive = True
    AutoCalcFields = False
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_rubro'
        ParamType = ptInput
      end>
    BeforeInsert = cMaterialBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cMaterialNewRecord
    DBConnection = Con
    Left = 56
    Top = 8
    object cMaterialID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cMaterialID_RUBRO: TIntegerField
      FieldName = 'ID_RUBRO'
      Required = True
    end
    object cMaterialID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
    end
    object cMaterialMATERIAL: TStringField
      DisplayWidth = 50
      FieldName = 'MATERIAL'
      Required = True
      Size = 50
    end
    object cMaterialPRECIO: TFloatField
      FieldName = 'PRECIO'
      Required = True
      DisplayFormat = '0.0000'
    end
    object cMaterialPRECIO1: TFloatField
      FieldName = 'PRECIO1'
      DisplayFormat = '0.0000'
    end
    object cMaterialPRECIO2: TFloatField
      FieldName = 'PRECIO2'
      DisplayFormat = '0.0000'
    end
    object cMaterialMAESTRO: TStringField
      FieldName = 'MAESTRO'
      Required = True
      Size = 1
    end
    object cMaterialCOD_ORIGEN: TStringField
      FieldName = 'COD_ORIGEN'
      Size = 8
    end
    object cMaterialMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cMaterialID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cMaterialunidad: TStringField
      FieldKind = fkLookup
      FieldName = 'unidad'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
    object cMaterialtotal: TAggregateField
      FieldName = 'total'
      Visible = True
      Active = True
      Expression = 'count(id_material)'
    end
  end
  object cGrupo: TSQLClientDataSet
    CommandText = 'GRUPO'
    Aggregates = <>
    IndexFieldNames = 'ORDEN'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cGrupoBeforeScroll
    OnNewRecord = cGrupoNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 16
    Top = 56
    object cGrupoID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cGrupoGRUPO: TStringField
      FieldName = 'GRUPO'
      Required = True
      Size = 30
    end
    object cGrupoORDEN: TSmallintField
      FieldName = 'ORDEN'
    end
  end
  object cItem: TSQLClientDataSet
    CommandText = 'select * from ITEM where ID_GRUPO = :id_grupo'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_grupo'
        ParamType = ptInput
      end>
    BeforeInsert = cItemBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cItemBeforeScroll
    OnNewRecord = cItemNewRecord
    DBConnection = Con
    Left = 56
    Top = 56
    object cItemID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cItemID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
      Required = True
    end
    object cItemITEM: TStringField
      FieldName = 'ITEM'
      Required = True
      Size = 45
    end
    object cItemID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
      Required = True
    end
    object cItemID_TIPOLOGIA: TSmallintField
      FieldName = 'ID_TIPOLOGIA'
    end
    object cItemunidad: TStringField
      FieldKind = fkLookup
      FieldName = 'unidad'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
    object cItemtipologia: TStringField
      FieldKind = fkLookup
      FieldName = 'tipologia'
      LookupDataSet = cTipologia
      LookupKeyFields = 'ID_TIPOLOGIA'
      LookupResultField = 'TIPOLOGIA'
      KeyFields = 'ID_TIPOLOGIA'
      Size = 40
      Lookup = True
    end
    object cItemVER: TSmallintField
      FieldName = 'VER'
    end
  end
  object cRubIt: TSQLClientDataSet
    CommandText = 
      'select ID_RUBRO, RUBRO from RUBRO R,  PROVEEDOR P'#13#10'where R.ID_PR' +
      'OVEEDOR = P.ID_PROVEEDOR'#13#10'and P.MAESTRO = 1'
    Aggregates = <>
    IndexFieldNames = 'rubro'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    ReadOnly = True
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 16
    Top = 112
    object cRubItID_RUBRO: TIntegerField
      FieldName = 'ID_RUBRO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cRubItRUBRO: TStringField
      FieldName = 'RUBRO'
      Size = 32
    end
  end
  object cOtroMat: TSQLClientDataSet
    CommandText = 
      'select ID_MATERIAL, MATERIAL, M.ID_UNIDAD, SIGLA, M.PRECIO from ' +
      'MATERIAL M, PROVEEDOR P, UNIDAD U'#13#10'where M.ID_PROVEEDOR = P.ID_P' +
      'ROVEEDOR and P.MAESTRO = 0'#13#10'and M.MAESTRO = 1and M.ID_UNIDAD = U' +
      '.ID_UNIDAD'
    Aggregates = <>
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    ReadOnly = True
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 104
    Top = 112
    object cOtroMatID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cOtroMatID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cOtroMatMATERIAL: TStringField
      DisplayWidth = 50
      FieldName = 'MATERIAL'
      Size = 34
    end
    object cOtroMatSIGLA: TStringField
      FieldName = 'SIGLA'
      Size = 3
    end
    object cOtroMatPRECIO: TFloatField
      FieldName = 'PRECIO'
    end
  end
  object cIteMat: TSQLClientDataSet
    CommandText = 'select * from ITEM_MATERIAL where ID_ITEM = :id_item'
    Aggregates = <>
    AggregatesActive = True
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_item'
        ParamType = ptInput
      end>
    BeforeInsert = cIteMatBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cIteMatNewRecord
    DBConnection = Con
    Left = 104
    Top = 56
    object cIteMatID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cIteMatID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cIteMatID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cIteMatCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      DisplayFormat = '#,###,##0.000'
    end
    object cIteMatMATERIAL: TStringField
      FieldName = 'MATERIAL'
      Size = 30
    end
    object cIteMatsigla: TStringField
      FieldKind = fkLookup
      FieldName = 'sigla'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
  end
  object cMatIt: TSQLClientDataSet
    CommandText = 
      'select ID_MATERIAL, MATERIAL, M.ID_UNIDAD, SIGLA, M.PRECIO from ' +
      'MATERIAL M, UNIDAD U'#13#10'where ID_RUBRO = :id_rubro and MAESTRO = 1' +
      'and M.ID_UNIDAD = U.ID_UNIDAD'
    Aggregates = <>
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftInteger
        Name = 'id_rubro'
        ParamType = ptInput
      end>
    ReadOnly = True
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 64
    Top = 112
    object cMatItID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cMatItID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cMatItMATERIAL: TStringField
      DisplayWidth = 50
      FieldName = 'MATERIAL'
      Size = 30
    end
    object cMatItSIGLA: TStringField
      FieldName = 'SIGLA'
      Size = 3
    end
    object cMatItPRECIO: TFloatField
      FieldName = 'PRECIO'
    end
  end
  object cMatEmp: TSQLClientDataSet
    CommandText = 
      'select ID_MATERIAL, MATERIAL, ID_PROVEEDOR, ID_UNIDAD '#13#10'from MAT' +
      'ERIAL '#13#10'where MAESTRO = 0 and (MATERIAL like :letra1 or MATERIAL' +
      ' like :letra2) and id_proveedor = :id_proveedor'
    Aggregates = <>
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'letra1'
        ParamType = ptInput
      end
      item
        DataType = ftUnknown
        Name = 'letra2'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 16
    Top = 160
    object cMatEmpID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cMatEmpMATERIAL: TStringField
      FieldName = 'MATERIAL'
      Size = 32
    end
    object cMatEmpID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
    end
    object cMatEmpID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cMatEmpsigla: TStringField
      FieldKind = fkLookup
      FieldName = 'sigla'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
  end
  object cEmp: TSQLClientDataSet
    CommandText = 
      'select * from EMPAREJAMIENTO E'#13#10'where E.id_material = :id_materi' +
      'al and id_proveedor = :id_proveedor'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'id_material'
        ParamType = ptInput
      end
      item
        DataType = ftUnknown
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cEmpNewRecord
    DBConnection = Con
    Left = 64
    Top = 160
    object cEmpID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cEmpIDEM_MATERIAL: TFloatField
      FieldName = 'IDEM_MATERIAL'
      Required = True
    end
    object cEmpCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      Required = True
    end
    object cEmpMATERIAL: TStringField
      FieldName = 'MATERIAL'
      Required = True
      Size = 30
    end
    object cEmpID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
    end
    object cEmpID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cEmpsigla: TStringField
      FieldKind = fkLookup
      FieldName = 'sigla'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
  end
  object cPresupuesto: TSQLClientDataSet
    CommandText = 'select * from PRESUPUESTO where id_presupuesto = :id_presupuesto'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
        Value = '0'
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cPresupuestoCalcFields
    OnNewRecord = cPresupuestoNewRecord
    DBConnection = Con
    Left = 360
    Top = 256
    object cPresupuestoID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      Required = True
    end
    object cPresupuestoDENOMINACION: TStringField
      FieldName = 'DENOMINACION'
      Required = True
      Size = 50
    end
    object cPresupuestoID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
      Required = True
    end
    object cPresupuestoID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
    end
    object cPresupuestoFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      EditMask = '!99/99/00;1;_'
    end
    object cPresupuestoCIRCUNSCRIPCION: TSmallintField
      FieldName = 'CIRCUNSCRIPCION'
    end
    object cPresupuestoSECCION: TStringField
      FieldName = 'SECCION'
      Size = 3
    end
    object cPresupuestoCHACRA: TStringField
      FieldName = 'CHACRA'
      Size = 6
    end
    object cPresupuestoQUINTA: TStringField
      FieldName = 'QUINTA'
      Size = 6
    end
    object cPresupuestoFRACCION: TStringField
      FieldName = 'FRACCION'
      Size = 6
    end
    object cPresupuestoPARCELA: TStringField
      FieldName = 'PARCELA'
      Size = 6
    end
    object cPresupuestoSUBPARCELA: TStringField
      FieldName = 'SUBPARCELA'
      Size = 6
    end
    object cPresupuestoSUPERFICIE_TERRENO: TFloatField
      FieldName = 'SUPERFICIE_TERRENO'
    end
    object cPresupuestoSUPERFICIE_EDIFICACION: TFloatField
      FieldName = 'SUPERFICIE_EDIFICACION'
    end
    object cPresupuestoGANANCIA: TFloatField
      FieldName = 'GANANCIA'
      Required = True
      DisplayFormat = '0.00'
    end
    object cPresupuestoMANZANA: TStringField
      FieldName = 'MANZANA'
      Size = 6
    end
    object cPresupuestoAPROBADO: TStringField
      FieldName = 'APROBADO'
      Size = 9
    end
    object cPresupuestoPLAZO_EJECUCION: TSmallintField
      FieldName = 'PLAZO_EJECUCION'
      Required = True
    end
    object cPresupuestoID_TIPOLOGIA: TSmallintField
      FieldName = 'ID_TIPOLOGIA'
    end
    object cPresupuestoSUBT_MO: TFloatField
      FieldName = 'SUBT_MO'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestoTOTAL: TFloatField
      FieldName = 'TOTAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestototal_ganancia: TFloatField
      FieldKind = fkCalculated
      FieldName = 'total_ganancia'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestomasGanancia: TFloatField
      FieldKind = fkCalculated
      FieldName = 'masGanancia'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestoSUBT_MAT: TFloatField
      FieldName = 'SUBT_MAT'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestoALICUOTA_MAT: TFloatField
      FieldName = 'ALICUOTA_MAT'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestoporAlicuotaMat: TFloatField
      FieldKind = fkCalculated
      FieldName = 'porAlicuotaMat'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestomatMasAlicuota: TFloatField
      FieldKind = fkCalculated
      FieldName = 'matMasAlicuota'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestoIVA: TFloatField
      FieldName = 'IVA'
      DisplayFormat = '0.00'
    end
    object cPresupuestototalIva: TFloatField
      FieldKind = fkCalculated
      FieldName = 'totalIva'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestosubtotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'subtotal'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestototal_general: TFloatField
      FieldKind = fkCalculated
      FieldName = 'total_general'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestoOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object cPresupuestolocalidad: TStringField
      FieldKind = fkLookup
      FieldName = 'localidad'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'LOCALIDAD'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cPresupuestoprovincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'provincia'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cPresupuestorazon: TStringField
      FieldKind = fkLookup
      FieldName = 'razon'
      LookupDataSet = cProv1
      LookupKeyFields = 'ID_PROVEEDOR'
      LookupResultField = 'RAZON'
      KeyFields = 'ID_PROVEEDOR'
      Size = 40
      Lookup = True
    end
    object cPresupuestotipologia: TStringField
      FieldKind = fkLookup
      FieldName = 'tipologia'
      LookupDataSet = cTipologia
      LookupKeyFields = 'ID_TIPOLOGIA'
      LookupResultField = 'TIPOLOGIA'
      KeyFields = 'ID_TIPOLOGIA'
      Lookup = True
    end
    object cPresupuestomatMenosDescontado: TFloatField
      FieldKind = fkCalculated
      FieldName = 'matMenosDescontado'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPresupuestoINICIO: TSQLTimeStampField
      FieldName = 'INICIO'
    end
    object cPresupuestoCOMBINADO: TStringField
      FieldName = 'COMBINADO'
      Required = True
      Size = 1
    end
    object cPresupuestoDIRECCION: TStringField
      FieldName = 'DIRECCION'
      Size = 60
    end
    object cPresupuestoPORC_FACTURADO: TFloatField
      FieldName = 'PORC_FACTURADO'
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestoIVA_LEY: TFloatField
      FieldName = 'IVA_LEY'
      DisplayFormat = '#,###,##0.00'
    end
    object cPresupuestoIDUSUARIO: TSmallintField
      FieldName = 'IDUSUARIO'
    end
    object cPresupuestoBLOQUEO_TEMP: TStringField
      FieldName = 'BLOQUEO_TEMP'
      Size = 1
    end
    object cPresupuestoSOLO_MO: TStringField
      FieldName = 'SOLO_MO'
      Required = True
      Size = 1
    end
  end
  object cItemPre: TSQLClientDataSet
    Tag = 1
    CommandText = 
      'select * from ITEM_PRESUPUESTO where id_presupuesto = :id_presup' +
      'uesto'
    Aggregates = <
      item
        AggregateName = 'total'
        Expression = 'sum(subtotal)'
        Visible = False
      end>
    AggregatesActive = True
    IndexFieldNames = 'id_grupo;orden'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    AfterOpen = cItemPreAfterOpen
    AfterClose = cItemPreAfterClose
    BeforeInsert = cItemPreBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    AfterPost = cItemPreAfterPost
    BeforeDelete = cRubroBeforeEdit
    AfterDelete = cItemPreAfterPost
    BeforeScroll = cItemPreBeforeScroll
    AfterRefresh = cItemPreAfterRefresh
    OnCalcFields = cItemPreCalcFields
    OnNewRecord = cItemPreNewRecord
    DBConnection = Con
    Left = 416
    Top = 256
    object cItemPreID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cItemPreID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cItemPreCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      Required = True
      DisplayFormat = '0.00'
    end
    object cItemPreID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cItemPreMATERIAL: TFloatField
      FieldName = 'MATERIAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cItemPreMO: TFloatField
      FieldName = 'MO'
      DisplayFormat = '#,###,##0.00'
    end
    object cItemPreID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
    end
    object cItemPreVER: TSmallintField
      FieldName = 'VER'
    end
    object cItemPreORDEN: TSmallintField
      FieldName = 'ORDEN'
    end
    object cItemPreitem: TStringField
      FieldKind = fkLookup
      FieldName = 'item'
      LookupDataSet = cItem1
      LookupKeyFields = 'ID_ITEM'
      LookupResultField = 'ITEM'
      KeyFields = 'ID_ITEM'
      Size = 60
      Lookup = True
    end
    object cItemPresigla: TStringField
      FieldKind = fkLookup
      FieldName = 'sigla'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
    object cItemPreunitario: TFloatField
      FieldKind = fkCalculated
      FieldName = 'unitario'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cItemPresubtotal: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'subtotal'
      DisplayFormat = '#,###,##0.00'
    end
    object cItemPreid_tipologia: TSmallintField
      FieldKind = fkLookup
      FieldName = 'id_tipologia'
      LookupDataSet = cItem1
      LookupKeyFields = 'ID_ITEM'
      LookupResultField = 'ID_TIPOLOGIA'
      KeyFields = 'ID_ITEM'
      Lookup = True
    end
    object cItemPregrupo: TStringField
      FieldKind = fkLookup
      FieldName = 'grupo'
      LookupDataSet = cGrupo
      LookupKeyFields = 'ID_GRUPO'
      LookupResultField = 'GRUPO'
      KeyFields = 'ID_GRUPO'
      Size = 30
      Lookup = True
    end
  end
  object cItem1: TSQLClientDataSet
    CommandText = 
      'SELECT  '#13#10'  ITEM.ID_ITEM,'#13#10'  ITEM.ID_GRUPO,'#13#10'  GRUPO.GRUPO ||'#39': ' +
      #39'||ITEM.ITEM as ITEM,'#13#10'  ITEM.ID_UNIDAD,'#13#10'  ITEM.ID_TIPOLOGIA'#13#10'F' +
      'ROM'#13#10'  GRUPO'#13#10'  INNER JOIN ITEM ON (GRUPO.ID_GRUPO = ITEM.ID_GRU' +
      'PO)'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 416
    Top = 208
    object cItem1ID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cItem1ID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cItem1ITEM: TStringField
      FieldName = 'ITEM'
      Size = 47
    end
    object cItem1ID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
    object cItem1ID_TIPOLOGIA: TSmallintField
      FieldName = 'ID_TIPOLOGIA'
      Required = True
    end
  end
  object qryVar1: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 128
    Top = 360
  end
  object qryVar2: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 168
    Top = 360
  end
  object cProv1: TSQLClientDataSet
    CommandText = 'PROVEEDOR'
    Aggregates = <>
    IndexFieldNames = 'razon'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cProv1BeforeScroll
    CommandType = ctTable
    DBConnection = Con
    Left = 112
    Top = 160
    object cProv1ID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
    end
    object cProv1RAZON: TStringField
      FieldName = 'RAZON'
      Required = True
      Size = 40
    end
    object cProv1MAESTRO: TStringField
      FieldName = 'MAESTRO'
      Size = 3
    end
    object cProv1MODIF: TSQLTimeStampField
      FieldName = 'MODIF'
    end
  end
  object cGasto: TSQLClientDataSet
    CommandText = 'GASTO'
    Aggregates = <>
    IndexFieldNames = 'id_gasto'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cGastoNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 472
    Top = 208
    object cGastoID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cGastoGASTO: TStringField
      FieldName = 'GASTO'
      Required = True
      Size = 50
    end
  end
  object cGastoPre: TSQLClientDataSet
    CommandText = 
      'select * from GASTO_PRESUPUESTO where id_presupuesto = :id_presu' +
      'puesto'
    Aggregates = <>
    AggregatesActive = True
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    BeforeInsert = cItemPreBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    AfterPost = cItemPreAfterPost
    BeforeDelete = cRubroBeforeEdit
    AfterDelete = cItemPreAfterPost
    BeforeScroll = cGastoPreBeforeScroll
    OnNewRecord = cGastoPreNewRecord
    DBConnection = Con
    Left = 472
    Top = 256
    object cGastoPreID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cGastoPreID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cGastoPreIMPORTE: TFloatField
      FieldName = 'IMPORTE'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cGastoPregasto: TStringField
      FieldKind = fkLookup
      FieldName = 'gasto'
      LookupDataSet = cGasto
      LookupKeyFields = 'ID_GASTO'
      LookupResultField = 'GASTO'
      KeyFields = 'ID_GASTO'
      Size = 50
      Lookup = True
    end
    object cGastoPretotal: TAggregateField
      FieldName = 'total'
      Visible = True
      Active = True
      Expression = 'sum(importe)'
    end
  end
  object cHistorico: TSQLClientDataSet
    CommandText = 'select * from HISTORICO where id_presupuesto = :id_presupuesto'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cHistoricoNewRecord
    DBConnection = Con
    Left = 528
    Top = 256
    object cHistoricoID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cHistoricoID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cHistoricoPRECIO: TFloatField
      FieldName = 'PRECIO'
      Required = True
    end
  end
  object DSet1: TSQLDataSet
    SQLConnection = Con
    Params = <>
    Left = 48
    Top = 360
  end
  object qryVar3: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 208
    Top = 360
  end
  object qryVar4: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 248
    Top = 360
  end
  object cInversor: TSQLClientDataSet
    CommandText = 'INVERSOR'
    Aggregates = <>
    IndexFieldNames = 'apellido'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cInversorNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 296
    Top = 208
    object cInversorID_INVERSOR: TSmallintField
      FieldName = 'ID_INVERSOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cInversorAPELLIDO: TStringField
      FieldName = 'APELLIDO'
      Required = True
      Size = 25
    end
    object cInversorNOMBRE: TStringField
      FieldName = 'NOMBRE'
      Size = 25
    end
    object cInversorDOMICILIO: TStringField
      FieldName = 'DOMICILIO'
      Size = 50
    end
    object cInversorALTA: TSQLTimeStampField
      FieldName = 'ALTA'
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cInversorID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
      Required = True
    end
    object cInversorCUIT: TStringField
      FieldName = 'CUIT'
      Size = 13
    end
    object cInversorEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 40
    end
    object cInversorCONDICION: TStringField
      FieldName = 'CONDICION'
      Size = 3
    end
    object cInversorOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object cInversorlocalidad: TStringField
      FieldKind = fkLookup
      FieldName = 'localidad'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'LOCALIDAD'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cInversorprovincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'provincia'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cInversorcaracteristica: TStringField
      FieldKind = fkLookup
      FieldName = 'caracteristica'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CARACTERISTICA'
      KeyFields = 'ID_LOCALIDAD'
      Size = 6
      Lookup = True
    end
    object cInversorcod_postal: TStringField
      FieldKind = fkLookup
      FieldName = 'cod_postal'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CODIGO_POSTAL'
      KeyFields = 'ID_LOCALIDAD'
      Size = 15
      Lookup = True
    end
  end
  object cInversorPresup: TSQLClientDataSet
    CommandText = 
      'select * from INVERSOR_PRESUPUESTO where ID_PRESUPUESTO = :id_pr' +
      'esupuesto'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    AfterClose = cInversorPresupAfterClose
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cInversorPresupCalcFields
    OnNewRecord = cInversorPresupNewRecord
    DBConnection = Con
    Left = 600
    Top = 256
    object cInversorPresupID_INVERSOR: TSmallintField
      FieldName = 'ID_INVERSOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cInversorPresupID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cInversorPresupPARTE: TFloatField
      FieldName = 'PARTE'
      Required = True
      DisplayFormat = '0.00'
    end
    object cInversorPresupapellido: TStringField
      FieldKind = fkLookup
      FieldName = 'apellido'
      LookupDataSet = cInversor
      LookupKeyFields = 'ID_INVERSOR'
      LookupResultField = 'APELLIDO'
      KeyFields = 'ID_INVERSOR'
      Size = 25
      Lookup = True
    end
    object cInversorPresupnombre: TStringField
      FieldKind = fkLookup
      FieldName = 'nombre'
      LookupDataSet = cInversor
      LookupKeyFields = 'ID_INVERSOR'
      LookupResultField = 'NOMBRE'
      KeyFields = 'ID_INVERSOR'
      Size = 25
      Lookup = True
    end
    object cInversorPresuptotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'total'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
  end
  object cTeInversor: TSQLClientDataSet
    CommandText = 'select * from TE_INVERSOR where ID_INVERSOR = :id_inversor'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_inversor'
        ParamType = ptInput
      end>
    BeforeInsert = cTeInversorBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cTeInversorNewRecord
    DBConnection = Con
    Left = 368
    Top = 208
    object cTeInversorNUMERO: TStringField
      FieldName = 'NUMERO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      Size = 12
    end
    object cTeInversorID_INVERSOR: TSmallintField
      FieldName = 'ID_INVERSOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object OpenDialog: TOpenDialog
    Left = 120
    Top = 408
  end
  object nuevo_id: TSQLStoredProc
    SQLConnection = Con
    Params = <
      item
        DataType = ftInteger
        Name = 'NUEVO_ID'
        ParamType = ptOutput
        Size = 4
      end>
    StoredProcName = 'PRESUPUESTO_GEN'
    Left = 56
    Top = 408
  end
  object cCampos: TSQLClientDataSet
    CommandText = 'select * from CAMPOS where ID_PROVEEDOR = :id_proveedor'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cCamposNewRecord
    DBConnection = Con
    Left = 64
    Top = 256
    object cCamposID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cCamposRIDRINF: TSmallintField
      FieldName = 'RIDRINF'
    end
    object cCamposRIDRSUP: TSmallintField
      FieldName = 'RIDRSUP'
    end
    object cCamposRINF: TSmallintField
      FieldName = 'RINF'
    end
    object cCamposRSUP: TSmallintField
      FieldName = 'RSUP'
    end
    object cCamposMIDRINF: TSmallintField
      FieldName = 'MIDRINF'
    end
    object cCamposMIDRSUP: TSmallintField
      FieldName = 'MIDRSUP'
    end
    object cCamposIDMINF: TSmallintField
      FieldName = 'IDMINF'
    end
    object cCamposIDMSUP: TSmallintField
      FieldName = 'IDMSUP'
    end
    object cCamposMINF: TSmallintField
      FieldName = 'MINF'
    end
    object cCamposMSUP: TSmallintField
      FieldName = 'MSUP'
    end
    object cCamposPINF: TSmallintField
      FieldName = 'PINF'
    end
    object cCamposPSUP: TSmallintField
      FieldName = 'PSUP'
    end
    object cCamposP15INF: TSmallintField
      FieldName = 'P15INF'
    end
    object cCamposP15SUP: TSmallintField
      FieldName = 'P15SUP'
    end
    object cCamposP30INF: TSmallintField
      FieldName = 'P30INF'
    end
    object cCamposP30SUP: TSmallintField
      FieldName = 'P30SUP'
    end
    object cCamposUNIINF: TSmallintField
      FieldName = 'UNIINF'
    end
    object cCamposUNISUP: TSmallintField
      FieldName = 'UNISUP'
    end
  end
  object cUnidad: TSQLClientDataSet
    CommandText = 'UNIDAD'
    Aggregates = <>
    IndexFieldNames = 'unidad'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cUnidadNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 16
    Top = 208
    object cUnidadID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cUnidadUNIDAD: TStringField
      FieldName = 'UNIDAD'
      Required = True
      Size = 15
    end
    object cUnidadSIGLA: TStringField
      FieldName = 'SIGLA'
      Required = True
      Size = 3
    end
  end
  object cUni: TSQLClientDataSet
    CommandText = 'APAREAR_UNI'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cUniNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 68
    Top = 208
    object cUniID_UNI: TSmallintField
      FieldName = 'ID_UNI'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cUniUNI: TStringField
      FieldName = 'UNI'
      Required = True
      Size = 10
    end
    object cUniID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
      Required = True
    end
    object cUnisigla: TStringField
      FieldKind = fkLookup
      FieldName = 'sigla'
      LookupDataSet = cUnidad
      LookupKeyFields = 'ID_UNIDAD'
      LookupResultField = 'SIGLA'
      KeyFields = 'ID_UNIDAD'
      Size = 3
      Lookup = True
    end
  end
  object empresa: TSQLClientDataSet
    CommandText = 'EMPRESA'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    CommandType = ctTable
    DBConnection = Con
    Left = 112
    Top = 208
    object empresaRAZON: TStringField
      FieldName = 'RAZON'
      Size = 42
    end
    object empresaDOMICILIO: TStringField
      FieldName = 'DOMICILIO'
      Size = 52
    end
    object empresaID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
    end
    object empresaALTA: TSQLTimeStampField
      FieldName = 'ALTA'
    end
    object empresaCUIT: TStringField
      FieldName = 'CUIT'
      Size = 15
    end
    object empresaEMAIL: TStringField
      FieldName = 'EMAIL'
      Size = 42
    end
    object empresaWEB: TStringField
      FieldName = 'WEB'
      Size = 52
    end
    object empresaOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object empresaLOGO: TBlobField
      FieldName = 'LOGO'
      GraphicHeader = False
      Size = 1
    end
    object empresaTE1: TStringField
      FieldName = 'TE1'
      Size = 17
    end
    object empresaTE2: TStringField
      FieldName = 'TE2'
      Size = 17
    end
    object empresalocalidad: TStringField
      FieldKind = fkLookup
      FieldName = 'localidad'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'LOCALIDAD'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object empresaprovincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'provincia'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object empresacaracteristica: TStringField
      FieldKind = fkLookup
      FieldName = 'caracteristica'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CARACTERISTICA'
      KeyFields = 'ID_LOCALIDAD'
      Size = 6
      Lookup = True
    end
    object empresacod_postal: TStringField
      FieldKind = fkLookup
      FieldName = 'cod_postal'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CODIGO_POSTAL'
      KeyFields = 'ID_LOCALIDAD'
      Size = 15
      Lookup = True
    end
  end
  object cMat_Auxiliar: TSQLClientDataSet
    CommandText = 'select * from MATERIAL where id_proveedor = :id_proveedor'
    Aggregates = <>
    AggregatesActive = True
    AutoCalcFields = False
    IndexFieldNames = 'cod_origen'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cMaterialBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cMat_AuxiliarNewRecord
    DBConnection = Con
    Left = 120
    Top = 8
    object cMat_AuxiliarMATERIAL: TStringField
      FieldName = 'MATERIAL'
      Size = 34
    end
    object cMat_AuxiliarID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
    end
    object cMat_AuxiliarID_RUBRO: TIntegerField
      FieldName = 'ID_RUBRO'
    end
    object cMat_AuxiliarID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
    end
    object cMat_AuxiliarPRECIO: TFloatField
      FieldName = 'PRECIO'
      DisplayFormat = '0.0000'
    end
    object cMat_AuxiliarPRECIO1: TFloatField
      FieldName = 'PRECIO1'
      DisplayFormat = '0.0000'
    end
    object cMat_AuxiliarPRECIO2: TFloatField
      FieldName = 'PRECIO2'
      DisplayFormat = '0.0000'
    end
    object cMat_AuxiliarMAESTRO: TStringField
      FieldName = 'MAESTRO'
      Size = 5
    end
    object cMat_AuxiliarCOD_ORIGEN: TStringField
      FieldName = 'COD_ORIGEN'
      Size = 12
    end
    object cMat_AuxiliarMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
    end
    object cMat_AuxiliarID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
    end
  end
  object cTipologia: TSQLClientDataSet
    CommandText = 'TIPOLOGIA'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cTipologiaNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 296
    Top = 256
    object cTipologiaID_TIPOLOGIA: TSmallintField
      FieldName = 'ID_TIPOLOGIA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
    end
    object cTipologiaTIPOLOGIA: TStringField
      FieldName = 'TIPOLOGIA'
      Size = 42
    end
  end
  object qryVar5: TSQLClientDataSet
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 288
    Top = 360
  end
  object cOperario: TSQLClientDataSet
    CommandText = 'OPERARIO'
    Aggregates = <>
    IndexFieldNames = 'apellido'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cOperarioNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 16
    Top = 304
    object cOperarioID_OPERARIO: TSmallintField
      FieldName = 'ID_OPERARIO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cOperarioAPELLIDO: TStringField
      FieldName = 'APELLIDO'
      Required = True
      Size = 27
    end
    object cOperarioNOMBRE: TStringField
      FieldName = 'NOMBRE'
      Size = 27
    end
    object cOperarioDOMICILIO: TStringField
      FieldName = 'DOMICILIO'
      Size = 52
    end
    object cOperarioID_LOCALIDAD: TFloatField
      FieldName = 'ID_LOCALIDAD'
      Required = True
    end
    object cOperarioCUIL: TStringField
      FieldName = 'CUIL'
      Size = 15
    end
    object cOperarioOBSERVACIONES: TBlobField
      FieldName = 'OBSERVACIONES'
      Size = 1
    end
    object cOperarioALTA: TSQLTimeStampField
      FieldName = 'ALTA'
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cOperarioID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      Required = True
    end
    object cOperariolocalidad: TStringField
      FieldKind = fkLookup
      FieldName = 'localidad'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'LOCALIDAD'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cOperariocaracteristica: TStringField
      FieldKind = fkLookup
      FieldName = 'caracteristica'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CARACTERISTICA'
      KeyFields = 'ID_LOCALIDAD'
      Size = 6
      Lookup = True
    end
    object cOperariocod_postal: TStringField
      FieldKind = fkLookup
      FieldName = 'cod_postal'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'CODIGO_POSTAL'
      KeyFields = 'ID_LOCALIDAD'
      Size = 15
      Lookup = True
    end
    object cOperarioprovincia: TStringField
      FieldKind = fkLookup
      FieldName = 'provincia'
      LookupDataSet = cLoc1
      LookupKeyFields = 'ID_LOCALIDAD'
      LookupResultField = 'provincia'
      KeyFields = 'ID_LOCALIDAD'
      Size = 30
      Lookup = True
    end
    object cOperarioresponsabilidad: TStringField
      FieldKind = fkLookup
      FieldName = 'responsabilidad'
      LookupDataSet = cResponsabilidad
      LookupKeyFields = 'ID_RESPONSABILIDAD'
      LookupResultField = 'RESPONSABILIDAD'
      KeyFields = 'ID_RESPONSABILIDAD'
      Size = 30
      Lookup = True
    end
    object cOperarioACTIVO: TStringField
      FieldName = 'ACTIVO'
      Size = 1
    end
  end
  object cTeOperario: TSQLClientDataSet
    CommandText = 'select * from TE_OPERARIO where ID_OPERARIO = :id_operario'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_operario'
        ParamType = ptInput
      end>
    BeforeInsert = cTeOperarioBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cTeOperarioNewRecord
    DBConnection = Con
    Left = 80
    Top = 304
    object cTeOperarioNUMERO: TStringField
      FieldName = 'NUMERO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      Size = 14
    end
    object cTeOperarioID_OPERARIO: TSmallintField
      FieldName = 'ID_OPERARIO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
  end
  object cResponsabilidad: TSQLClientDataSet
    CommandText = 'RESPONSABILIDAD'
    Aggregates = <>
    IndexFieldNames = 'responsabilidad'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforePost = cResponsabilidadBeforePost
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cResponsabilidadCalcFields
    OnNewRecord = cResponsabilidadNewRecord
    CommandType = ctTable
    DBConnection = Con
    Left = 152
    Top = 304
    object cResponsabilidadID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cResponsabilidadRESPONSABILIDAD: TStringField
      FieldName = 'RESPONSABILIDAD'
      Required = True
      Size = 32
    end
    object cResponsabilidadENMANO: TFloatField
      FieldName = 'ENMANO'
      DisplayFormat = '#,###,##0.00'
    end
    object cResponsabilidadCARGASOCIAL: TFloatField
      FieldName = 'CARGASOCIAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cResponsabilidadtotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'total'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cResponsabilidadIDRESP_AGRUPADA: TSmallintField
      FieldName = 'IDRESP_AGRUPADA'
    end
    object cResponsabilidadMODIF: TSQLTimeStampField
      FieldName = 'MODIF'
    end
  end
  object cObra: TSQLClientDataSet
    CommandText = 'select * from OBRA where id_obra = :id_obra'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cObraNewRecord
    DBConnection = Con
    Left = 416
    Top = 312
    object cObraID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cObraINICIO: TSQLTimeStampField
      FieldName = 'INICIO'
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cObraESTADO: TStringField
      FieldName = 'ESTADO'
      Required = True
      Size = 3
    end
  end
  object cImagenObra: TSQLClientDataSet
    CommandText = 
      'select * from IMAGEN_OBRA where id_obra = :id_obra order by id_i' +
      'magen_obra'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cImagenObraNewRecord
    DBConnection = Con
    Left = 472
    Top = 312
    object cImagenObraID_IMAGEN_OBRA: TIntegerField
      FieldName = 'ID_IMAGEN_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cImagenObraID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      Required = True
    end
    object cImagenObraFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      Required = True
    end
    object cImagenObraIMAGEN: TBlobField
      FieldName = 'IMAGEN'
      BlobType = ftTypedBinary
      GraphicHeader = False
      Size = 1
    end
    object cImagenObraDETALLE: TStringField
      FieldName = 'DETALLE'
      Size = 102
    end
  end
  object cCertificacion: TSQLClientDataSet
    CommandText = 
      'select * from CERTIFICACION where id_obra = :id_obra and id_item' +
      ' = :id_item'
    Aggregates = <>
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end
      item
        DataType = ftSmallint
        Name = 'id_item'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cCertificacionCalcFields
    OnNewRecord = cCertificacionNewRecord
    DBConnection = Con
    Left = 544
    Top = 312
    object cCertificacionID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cCertificacionID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cCertificacionFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cCertificacionAVANCE: TFloatField
      FieldName = 'AVANCE'
      Required = True
    end
    object cCertificacionfecha2: TDateField
      FieldKind = fkCalculated
      FieldName = 'fecha2'
      Calculated = True
    end
  end
  object cCompra: TSQLClientDataSet
    CommandText = 'select * from COMPRA where ID_OBRA = :id_obra'
    Aggregates = <>
    IndexFieldNames = 'FECHA;ID_PROVEEDOR;NUMERO'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cCompraCalcFields
    OnNewRecord = cCompraNewRecord
    DBConnection = Con
    Left = 472
    Top = 360
    object cCompraID_COMPRA: TIntegerField
      FieldName = 'ID_COMPRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cCompraNUMERO: TIntegerField
      FieldName = 'NUMERO'
    end
    object cCompraLETRA: TStringField
      Alignment = taCenter
      FieldName = 'LETRA'
      Size = 3
    end
    object cCompraID_PROVEEDOR: TSmallintField
      FieldName = 'ID_PROVEEDOR'
      Required = True
      OnChange = cCompraID_PROVEEDORChange
    end
    object cCompraID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      Required = True
    end
    object cCompraFECHA: TSQLTimeStampField
      Alignment = taCenter
      FieldName = 'FECHA'
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cCompraIVA: TFloatField
      FieldName = 'IVA'
      DisplayFormat = '0.00'
    end
    object cCompraDESCUENTO: TFloatField
      FieldName = 'DESCUENTO'
      DisplayFormat = '0.00'
    end
    object cCompraTOTAL: TFloatField
      FieldName = 'TOTAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cCompraproveedor: TStringField
      FieldKind = fkLookup
      FieldName = 'proveedor'
      LookupDataSet = cProv1
      LookupKeyFields = 'ID_PROVEEDOR'
      LookupResultField = 'RAZON'
      KeyFields = 'ID_PROVEEDOR'
      Size = 40
      Lookup = True
    end
    object cCompracalcIva: TFloatField
      FieldKind = fkCalculated
      FieldName = 'calcIva'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cComprasub1: TFloatField
      FieldKind = fkCalculated
      FieldName = 'sub1'
      DisplayFormat = '#,###,##0.00'
      currency = True
      Calculated = True
    end
    object cCompracalcDesc: TFloatField
      FieldKind = fkCalculated
      FieldName = 'calcDesc'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cCompratotalGeneral: TFloatField
      FieldKind = fkCalculated
      FieldName = 'totalGeneral'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cCompraID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
    end
    object cCompragrupo: TStringField
      FieldKind = fkLookup
      FieldName = 'grupo'
      LookupDataSet = cdsGrupoLook
      LookupKeyFields = 'ID_GRUPO'
      LookupResultField = 'GRUPO'
      KeyFields = 'ID_GRUPO'
      Size = 40
      Lookup = True
    end
    object cCompraPIB: TFloatField
      FieldName = 'PIB'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cCompraNUMERO_OC: TIntegerField
      Alignment = taCenter
      FieldName = 'NUMERO_OC'
      OnSetText = cCompraNUMERO_OCSetText
    end
  end
  object cRenglonCompra: TSQLClientDataSet
    CommandText = 'select * from RENGLON_COMPRA_NEW where ID_COMPRA = :id_compra'
    Aggregates = <>
    AggregatesActive = True
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftInteger
        Name = 'id_compra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    AfterPost = cRenglonCompraAfterPost
    BeforeDelete = cRubroBeforeEdit
    AfterDelete = cRenglonCompraAfterPost
    OnCalcFields = cRenglonCompraCalcFields
    OnNewRecord = cRenglonCompraNewRecord
    DBConnection = Con
    Left = 544
    Top = 360
    object cRenglonCompraID_COMPRA: TIntegerField
      FieldName = 'ID_COMPRA'
      Required = True
    end
    object cRenglonCompraCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      Required = True
      DisplayFormat = '0.0000'
    end
    object cRenglonCompraID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      Required = True
    end
    object cRenglonCompraMATERIAL: TStringField
      DisplayWidth = 50
      FieldName = 'MATERIAL'
      Required = True
      Size = 50
    end
    object cRenglonCompraUNITARIO: TFloatField
      FieldName = 'UNITARIO'
      Required = True
      DisplayFormat = '#,###,##0.0000'
    end
    object cRenglonComprasubtotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'subtotal'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cRenglonCompraidRubro: TIntegerField
      FieldKind = fkLookup
      FieldName = 'idRubro'
      LookupDataSet = cMaterial
      LookupKeyFields = 'ID_MATERIAL'
      LookupResultField = 'ID_RUBRO'
      KeyFields = 'ID_MATERIAL'
      Lookup = True
    end
    object cRenglonComprarubro: TStringField
      FieldKind = fkLookup
      FieldName = 'rubro'
      LookupDataSet = cRubro
      LookupKeyFields = 'ID_RUBRO'
      LookupResultField = 'RUBRO'
      KeyFields = 'idRubro'
      Size = 40
      Lookup = True
    end
    object cRenglonCompraID_RENGLON: TIntegerField
      FieldName = 'ID_RENGLON'
      Required = True
    end
  end
  object cPago_Sub: TSQLClientDataSet
    CommandText = 
      'select * from PAGO_SUB where id_obra = :id_obra and id_sub = :id' +
      '_proveedor'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end
      item
        DataType = ftSmallint
        Name = 'id_proveedor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cPago_SubCalcFields
    OnNewRecord = cPago_SubNewRecord
    DBConnection = Con
    Left = 472
    Top = 408
    object cPago_SubFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cPago_SubID_SUB: TSmallintField
      FieldName = 'ID_SUB'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPago_SubID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPago_SubENMANO: TFloatField
      FieldName = 'ENMANO'
      DisplayFormat = '#,###,##0.00'
    end
    object cPago_SubCARGASOCIAL: TFloatField
      FieldName = 'CARGASOCIAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cPago_Subsuma: TFloatField
      FieldKind = fkCalculated
      FieldName = 'suma'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPago_Subsubtotal: TAggregateField
      FieldName = 'subtotal'
      Visible = True
      Active = True
      currency = True
      DisplayFormat = '#,###,###,##0.00'
      Expression = 'sum(enmano + cargasocial)'
    end
    object cPago_Submano: TAggregateField
      FieldName = 'mano'
      Visible = True
      Active = True
      DisplayFormat = '#,###,###,##0.00'
      Expression = 'sum(enmano)'
    end
  end
  object cPago_Ope: TSQLClientDataSet
    CommandText = 
      'select * from PAGO_OPERARIO where id_obra = :id_obra and id_oper' +
      'ario = :id_operario'
    Aggregates = <>
    AggregatesActive = True
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
        Value = '0'
      end
      item
        DataType = ftSmallint
        Name = 'id_operario'
        ParamType = ptInput
        Value = '0'
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cPago_OpeCalcFields
    OnNewRecord = cPago_OpeNewRecord
    DBConnection = Con
    Left = 544
    Top = 408
    object cPago_OpeFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cPago_OpeID_OPERARIO: TSmallintField
      FieldName = 'ID_OPERARIO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPago_OpeID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPago_OpeCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      Required = True
      DisplayFormat = '0.00'
    end
    object cPago_OpeENMANO: TFloatField
      FieldName = 'ENMANO'
      DisplayFormat = '#,###,##0.00'
    end
    object cPago_OpeCARGASOCIAL: TFloatField
      FieldName = 'CARGASOCIAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cPago_OpeADICIONAL: TFloatField
      FieldName = 'ADICIONAL'
      DisplayFormat = '#,###,##0.00'
    end
    object cPago_OpemontoTotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'montoTotal'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPago_OpeporHora: TFloatField
      FieldKind = fkCalculated
      FieldName = 'porHora'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cPago_OpeID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      Required = True
      OnChange = cPago_OpeID_RESPONSABILIDADChange
    end
    object cPago_Operesponsabilidad: TStringField
      FieldKind = fkLookup
      FieldName = 'responsabilidad'
      LookupDataSet = cResponsabilidad
      LookupKeyFields = 'ID_RESPONSABILIDAD'
      LookupResultField = 'RESPONSABILIDAD'
      KeyFields = 'ID_RESPONSABILIDAD'
      Size = 30
      Lookup = True
    end
    object cPago_Opesubtotal: TAggregateField
      FieldName = 'subtotal'
      Visible = True
      Active = True
      currency = True
      Expression = 'sum(cantidad * (enmano+cargasocial) + adicional)'
    end
    object cPago_Opecobrado: TAggregateField
      FieldName = 'cobrado'
      Active = True
      currency = True
      Expression = 'sum(cantidad * enmano + adicional)'
    end
  end
  object cOpe1: TSQLClientDataSet
    CommandText = 
      'select id_operario, apellido ||'#39', '#39'|| nombre apenom, O.id_respon' +
      'sabilidad, responsabilidad, enmano, cargasocial, apellido from o' +
      'perario O, responsabilidad R where O.id_responsabilidad = R.id_r' +
      'esponsabilidad order by apellido, nombre'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cOpe1BeforeScroll
    DBConnection = Con
    Left = 224
    Top = 304
    object cOpe1ID_OPERARIO: TSmallintField
      FieldName = 'ID_OPERARIO'
    end
    object cOpe1APENOM: TStringField
      FieldName = 'APENOM'
      Size = 54
    end
    object cOpe1RESPONSABILIDAD: TStringField
      FieldName = 'RESPONSABILIDAD'
      Size = 32
    end
    object cOpe1ENMANO: TFloatField
      FieldName = 'ENMANO'
    end
    object cOpe1CARGASOCIAL: TFloatField
      FieldName = 'CARGASOCIAL'
    end
    object cOpe1ID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      Required = True
    end
    object cOpe1APELLIDO: TStringField
      FieldName = 'APELLIDO'
      Required = True
      Size = 25
    end
  end
  object cPagoIndi: TSQLClientDataSet
    CommandText = 
      'select * from PAGOS_INDIRECTOS where id_gasto = :id_gasto and id' +
      '_obra = :id_obra'
    Aggregates = <>
    AggregatesActive = True
    AutoCalcFields = False
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_gasto'
        ParamType = ptInput
      end
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cPagoIndiBeforeEdit
    BeforeEdit = cPagoIndiBeforeEdit
    BeforeDelete = cPagoIndiBeforeEdit
    OnNewRecord = cPagoIndiNewRecord
    DBConnection = Con
    Left = 416
    Top = 408
    object cPagoIndiID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoIndiID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoIndiFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoIndiIMPORTE: TFloatField
      FieldName = 'IMPORTE'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPagoIndisubtotal: TAggregateField
      FieldName = 'subtotal'
      Visible = True
      Active = True
      currency = True
      Expression = 'sum(importe)'
    end
  end
  object cCobroInversor: TSQLClientDataSet
    CommandText = 
      'select * from COBRO_INVERSOR where id_obra = :id_obra and id_inv' +
      'ersor = :id_inversor'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end
      item
        DataType = ftSmallint
        Name = 'id_inversor'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cCobroInversorNewRecord
    DBConnection = Con
    Left = 352
    Top = 408
    object cCobroInversorID_INVERSOR: TSmallintField
      FieldName = 'ID_INVERSOR'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cCobroInversorID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cCobroInversorFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cCobroInversorMONTO: TFloatField
      FieldName = 'MONTO'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cCobroInversorCOMPROBANTE: TStringField
      FieldName = 'COMPROBANTE'
      Required = True
    end
    object cCobroInversorOBSERVACIONES: TStringField
      FieldName = 'OBSERVACIONES'
      Size = 50
    end
    object cCobroInversorsubtotal: TAggregateField
      FieldName = 'subtotal'
      Visible = True
      Active = True
      currency = True
      Expression = 'sum(monto)'
    end
  end
  object cdsInversores: TSQLClientDataSet
    CommandText = 
      'select IP.ID_INVERSOR, APELLIDO||'#39', '#39'|| NOMBRE apenom, PARTE fro' +
      'm INVERSOR_PRESUPUESTO IP, INVERSOR I where IP.ID_INVERSOR = I.I' +
      'D_INVERSOR and ID_PRESUPUESTO = :id_obra'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cdsInversoresBeforeScroll
    DBConnection = Con
    Left = 600
    Top = 208
    object cdsInversoresID_INVERSOR: TSmallintField
      FieldName = 'ID_INVERSOR'
    end
    object cdsInversoresAPENOM: TStringField
      FieldName = 'APENOM'
      Size = 54
    end
    object cdsInversoresPARTE: TFloatField
      FieldName = 'PARTE'
      DisplayFormat = '0.00'
    end
  end
  object cIteMo: TSQLClientDataSet
    CommandText = 'select * from ITEM_MO where ID_ITEM = :id_item'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_item'
        ParamType = ptInput
      end>
    BeforeInsert = cIteMatBeforeInsert
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cIteMoCalcFields
    OnNewRecord = cIteMoNewRecord
    DBConnection = Con
    Left = 144
    Top = 56
    object cIteMoID_ITEM: TSmallintField
      FieldName = 'ID_ITEM'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cIteMoID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cIteMoCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      Required = True
      DisplayFormat = '0.00'
    end
    object cIteMocategoria: TStringField
      FieldKind = fkLookup
      FieldName = 'categoria'
      LookupDataSet = cResponsabilidad
      LookupKeyFields = 'ID_RESPONSABILIDAD'
      LookupResultField = 'RESPONSABILIDAD'
      KeyFields = 'ID_RESPONSABILIDAD'
      Size = 30
      Lookup = True
    end
    object cIteMosubtotal: TFloatField
      FieldKind = fkCalculated
      FieldName = 'subtotal'
      DisplayFormat = '#,###,##0.00'
      Calculated = True
    end
    object cIteMovalorHora: TFloatField
      FieldKind = fkLookup
      FieldName = 'valorHora'
      LookupDataSet = cResponsabilidad
      LookupKeyFields = 'ID_RESPONSABILIDAD'
      LookupResultField = 'total'
      KeyFields = 'ID_RESPONSABILIDAD'
      DisplayFormat = '#,###,##0.00'
      Lookup = True
    end
  end
  object cHistoricoMo: TSQLClientDataSet
    CommandText = 
      'select * from HISTORICO_MO where id_presupuesto = :id_presupuest' +
      'o'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cHistoricoMoNewRecord
    DBConnection = Con
    Left = 528
    Top = 208
    object cHistoricoMoID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cHistoricoMoID_RESPONSABILIDAD: TSmallintField
      FieldName = 'ID_RESPONSABILIDAD'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cHistoricoMoENMANO: TFloatField
      FieldName = 'ENMANO'
      DisplayFormat = '#,###,##0.00'
    end
    object cHistoricoMoCARGASOCIAL: TFloatField
      FieldName = 'CARGASOCIAL'
      DisplayFormat = '#,###,##0.00'
    end
  end
  object cConstantes: TSQLClientDataSet
    CommandText = 'CONSTANTES'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    CommandType = ctTable
    DBConnection = Con
    Left = 472
    Top = 160
    object cConstantesID_CONSTANTE: TSmallintField
      FieldName = 'ID_CONSTANTE'
    end
    object cConstantesDETALLE: TStringField
      FieldName = 'DETALLE'
      Size = 22
    end
    object cConstantesVALOR: TFloatField
      FieldName = 'VALOR'
      DisplayFormat = '#,###,##0.00'
    end
  end
  object cModificador: TSQLClientDataSet
    CommandText = 'select * from MODIFICADOR where id_presupuesto = :id_presupuesto'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftFloat
        Name = 'id_presupuesto'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnCalcFields = cModificadorCalcFields
    OnNewRecord = cModificadorNewRecord
    DBConnection = Con
    Left = 240
    Top = 256
    object cModificadorID_MODIFICACION: TIntegerField
      FieldName = 'ID_MODIFICACION'
    end
    object cModificadorID_PRESUPUESTO: TFloatField
      FieldName = 'ID_PRESUPUESTO'
    end
    object cModificadorID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
    end
    object cModificadorCANTIDAD: TFloatField
      FieldName = 'CANTIDAD'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadorMATERIAL: TStringField
      FieldName = 'MATERIAL'
      Size = 30
    end
    object cModificadorsubtotal: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'subtotal'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadorporAlicuota: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'porAlicuota'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadorconAlicuota: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'conAlicuota'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadorporIva: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'porIva'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadorsubConIva: TFloatField
      FieldKind = fkInternalCalc
      FieldName = 'subConIva'
      DisplayFormat = '#,###,##0.00'
    end
    object cModificadortotal: TAggregateField
      Alignment = taRightJustify
      FieldName = 'total'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(subtotal)'
    end
    object cModificadortotalConIva: TAggregateField
      Alignment = taRightJustify
      FieldName = 'totalConIva'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(subConIva)'
    end
    object cModificadortotalAlicuota: TAggregateField
      FieldName = 'totalAlicuota'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(conAlicuota)'
    end
    object cModificadortotalPorAlicuota: TAggregateField
      FieldName = 'totalPorAlicuota'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(porAlicuota)'
    end
    object cModificadortotalPorIva: TAggregateField
      FieldName = 'totalPorIva'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(porIva)'
    end
  end
  object cGastoEmpresa: TSQLClientDataSet
    CommandText = 'select * from GASTO_EMPRESA order by GASTO'
    Aggregates = <>
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    BeforeScroll = cGastoEmpresaBeforeScroll
    OnNewRecord = cGastoEmpresaNewRecord
    DBConnection = Con
    Left = 496
    Top = 112
    object cGastoEmpresaID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cGastoEmpresaGASTO: TStringField
      FieldName = 'GASTO'
      Required = True
      Size = 50
    end
  end
  object cPagoGastoEmpresa: TSQLClientDataSet
    CommandText = 'select * from PAGO_GASTO_EMPRESA where id_gasto = :id_gasto'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftSmallint
        Name = 'id_gasto'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cPagoGastoEmpresaNewRecord
    DBConnection = Con
    Left = 600
    Top = 112
    object cPagoGastoEmpresaID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoGastoEmpresaFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cPagoGastoEmpresaCOMPROBANTE: TStringField
      FieldName = 'COMPROBANTE'
      Size = 30
    end
    object cPagoGastoEmpresaMONTO: TFloatField
      FieldName = 'MONTO'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPagoGastoEmpresasubtotal: TAggregateField
      Alignment = taRightJustify
      FieldName = 'subtotal'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(monto)'
    end
  end
  object cPagoGastoObra: TSQLClientDataSet
    CommandText = 
      'select * from PAGO_GASTO_OBRA_NEW where id_gasto = :id_gasto and' +
      ' id_obra = :id_obra'
    Aggregates = <>
    AggregatesActive = True
    IndexFieldNames = 'fecha'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftUnknown
        Name = 'id_gasto'
        ParamType = ptInput
      end
      item
        DataType = ftUnknown
        Name = 'id_obra'
        ParamType = ptInput
      end>
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    OnNewRecord = cPagoGastoObraNewRecord
    DBConnection = Con
    Left = 592
    Top = 160
    object cPagoGastoObraID_GASTO: TSmallintField
      FieldName = 'ID_GASTO'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoGastoObraID_OBRA: TFloatField
      FieldName = 'ID_OBRA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object cPagoGastoObraFECHA: TSQLTimeStampField
      FieldName = 'FECHA'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
      EditMask = '!99/99/00;1;_'
    end
    object cPagoGastoObraCOMPROBANTE: TStringField
      FieldName = 'COMPROBANTE'
      Size = 30
    end
    object cPagoGastoObraMONTO: TFloatField
      FieldName = 'MONTO'
      Required = True
      DisplayFormat = '#,###,##0.00'
    end
    object cPagoGastoObraIDPAGO: TIntegerField
      FieldName = 'IDPAGO'
      Required = True
    end
    object cPagoGastoObrasubtotal: TAggregateField
      FieldName = 'subtotal'
      Visible = True
      Active = True
      DisplayFormat = '#,###,##0.00'
      Expression = 'sum(monto)'
    end
  end
  object cRubIt2: TSQLClientDataSet
    CommandText = 
      'select ID_RUBRO, RUBRO from RUBRO R,  PROVEEDOR P'#13#10'where R.ID_PR' +
      'OVEEDOR = P.ID_PROVEEDOR'#13#10'and P.ID_PROVEEDOR = :id'
    Aggregates = <>
    IndexFieldNames = 'rubro'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'id'
        ParamType = ptInput
        Value = '0'
      end>
    ReadOnly = True
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 152
    Top = 112
    object cRubIt2ID_RUBRO: TIntegerField
      FieldName = 'ID_RUBRO'
      Required = True
    end
    object cRubIt2RUBRO: TStringField
      FieldName = 'RUBRO'
      Required = True
      Size = 30
    end
  end
  object cMatIt2: TSQLClientDataSet
    CommandText = 
      'select ID_MATERIAL, MATERIAL, M.ID_UNIDAD, SIGLA, M.PRECIO from ' +
      'MATERIAL M, UNIDAD U'#13#10'where ID_RUBRO = :id_rubro and M.ID_UNIDAD' +
      ' = U.ID_UNIDAD'
    Aggregates = <>
    IndexFieldNames = 'material'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftInteger
        Name = 'id_rubro'
        ParamType = ptInput
      end>
    ReadOnly = True
    BeforeInsert = cRubroBeforeEdit
    BeforeEdit = cRubroBeforeEdit
    BeforeDelete = cRubroBeforeEdit
    DBConnection = Con
    Left = 192
    Top = 112
    object cMatIt2ID_MATERIAL: TFloatField
      FieldName = 'ID_MATERIAL'
      Required = True
    end
    object cMatIt2MATERIAL: TStringField
      FieldName = 'MATERIAL'
      Required = True
      Size = 50
    end
    object cMatIt2ID_UNIDAD: TSmallintField
      FieldName = 'ID_UNIDAD'
      Required = True
    end
    object cMatIt2SIGLA: TStringField
      FieldName = 'SIGLA'
      Required = True
      Size = 3
    end
    object cMatIt2PRECIO: TFloatField
      FieldName = 'PRECIO'
      Required = True
    end
  end
  object cdsGrupoLook: TSQLClientDataSet
    Tag = 1
    CommandText = 
      'select distinct IP.ID_GRUPO, G.GRUPO '#13#10'from ITEM_PRESUPUESTO IP,' +
      ' GRUPO G'#13#10'where IP.ID_GRUPO=G.ID_GRUPO and id_presupuesto = :id_' +
      'presupuesto'
    Aggregates = <
      item
        AggregateName = 'total'
        Expression = 'sum(subtotal)'
        Visible = False
      end>
    AggregatesActive = True
    IndexFieldNames = 'GRUPO'
    Options = [poAllowCommandText]
    ObjectView = True
    Params = <
      item
        DataType = ftString
        Name = 'id_presupuesto'
        ParamType = ptInput
        Value = '0'
      end>
    OnNewRecord = cdsInversoresBeforeScroll
    DBConnection = Con
    Left = 408
    Top = 360
    object cdsGrupoLookID_GRUPO: TSmallintField
      FieldName = 'ID_GRUPO'
      Required = True
    end
    object cdsGrupoLookGRUPO: TStringField
      FieldName = 'GRUPO'
      Required = True
      Size = 30
    end
  end
end
